package com.crm.model.mdao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.crm.model.mpojo.Tasks;

/**
 * 待办任务
 * @author 梁箐
 *
 */
@Mapper
public interface TaskMapper {

	int deleteByPrimaryKey(Integer taskId);

    int insert(Tasks record);

    int insertSelective(Tasks record);

    Tasks selectByPrimaryKey(Integer taskId);

    int updateByPrimaryKeySelective(Tasks record);

    int updateByPrimaryKey(Tasks record);
	
	//查所有
	public List<Map<String, String>> selectAll();
	
	//查询售后各表总数
	public Map<String,String> AllTasksCount();
	
	//销售各阶段跟踪
	public Map<String, String> allChance();
	
	/**
	 * 查询所有（状态未禁用）带条件分页
	 * @return
	 */
	public List<Map<String, String>> selectAllNew(@Param("deptid") Integer deptid,@Param("manID") Integer uid,@Param("status") Integer status,@Param("description") String description);
	
	/**
	 * 查询所有（导出）
	 * @return
	 */
	public List<Map<String, String>> selectAllInfo(@Param("deptid") Integer deptid,@Param("manID") Integer uid);
	
	
	/**
	 * 查询单条
	 * @param taskID
	 * @return
	 */
	public Map<String , String> selectByid(@Param("ID") Integer taskID);
	
	/**
	 * 物理删除（根据id）
	 * @param taskID
	 * @return 
	 */
	public int deleteByDeletestatue(@Param("ID") Integer taskID); 
	
}
